package com.mxpio.erp.common.technology.vo;

import java.math.BigDecimal;
import java.util.List;

import javax.persistence.Transient;

import com.mxpio.erp.common.inventory.entity.SupplyChain;
import com.mxpio.erp.common.inventory.entity.Warehouse;
import com.mxpio.erp.common.technology.entity.*;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
@Schema(description="物料带扩展信息")
public class ItemWithSubExtendsVO extends BaseEntity {

	private static final long serialVersionUID = 1L;
	
	@Schema(description = "物料编码")
	private String itemCode;
	
	@Schema(description = "物料名称")
	private String itemName;
	
	@Schema(description = "物料组")
	@Dict(dicCode="groupCode", dicEntity = ItemGroup.class, dicText = "groupName")
	private String itemGroupCode;
	
	@Schema(description = "物料规格")
	private String itemSpec;
	
	@Schema(description = "图号")
	private String drawingNo;
	
	@Schema(description = "图档号")
	private String drawingFileNo;
	
	@Schema(description = "单位编号")
	@Dict(dicCode="ERP_TECH_UNIT_CODE")
	private String unitCode;
	
	@Schema(description = "数量精度")
	private Integer scale = 0;
	
	@Schema(description = "物料来源")
	@Dict(dicCode="ERP_TECH_ITEM_SOURCE")
	private String itemSource;
	
	@Schema(description = "是否虚拟件")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String virtualPart;
	
	@Schema(description = "是否材料")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String material;
	
	@Schema(description = "ABC码")
	private String abcCode;
	
	@Transient
	private List<SupplyChain> supplyChains;

	@Schema(description = "物料价格")
	private BigDecimal itemPrice;
	
	@Schema(description = "图片路径")
	private String imgFile;
	
	@Schema(description = "备注")
	private String memo;


	@Schema(description = "默认仓库编号")
	@Dict(dicCode = "whCode" ,dicEntity = Warehouse.class, dicText = "whName")
	private String defaultWhCode;

	@Schema(description = "主制车间")
	@Dict(dicCode = "workShopCode",dicEntity = WorkShop.class,dicText = "workShopName")
	private String mainWorkshop;


	@Schema(description = "可自制")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String manufactureAble;

	@Schema(description = "可委外")
	@Dict(dicCode = "ERP_COMMON_YESNO")
	private String outsourceAble;

	@Schema(description = "工作中心")
	@Dict(dicCode = "workCenterCode",dicEntity = WorkCenter.class,dicText = "workCenterName")
	private String workCenterCode;

	@Schema(description = "材料牌号")//240117 该字段由ItemMaterialProp移至主表对象中
	private String materialBrand;

	@Transient
	private ItemLeadTimeProp itemLeadTimeProp;

	@Transient
	private ItemPlanProp itemPlanProp;

	@Transient
	private ItemPurchaseProp itemPurchaseProp;

	@Transient
	private ItemStoreProp itemStoreProp;

	@Transient
	private ItemMaterialProp itemMaterialProp;
}
